import {useSelector} from "react-redux";
import CreateUser
    from "../features/user/CreateUser.jsx";
import Button from "./Button.jsx";

function Home() {
    const username = useSelector((state) => state.user.username);


  return (
    <div>
      <h1 className={"text-xl text-yellow-500 text-center font-semibold"}>
        The best pizza.
        <br />
          <span className={"text-yellow-500"}>
                Straight out of the oven, straight to you.
          </span>
      </h1>

        {username === '' ? <CreateUser /> : <Button to={'/menu'} type={"primary"}>
            Continue ordering,{ username }
        </Button>
        }

    </div>
  );
}

export default Home;
